import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueI18n from 'vue-i18n'
import { i18n } from './i18n'
import './assets/css/index.css'
Vue.use(ElementUI, VueI18n);
axios.defaults.headers = { 'Content-Type': 'text/html;charset=gb2312' }
axios.defaults.baseURL = 'http://www.portal-q-cells.us:8080'
Vue.prototype.axios = axios
Vue.config.productionTip = false
Vue.directive('focus', {
    // 当被绑定的元素插入到 DOM 中时……
    inserted: function(el) {
        // 聚焦元素
        el.focus()
            // console.log(el, 'el')
    },
    bind: function() {
        // el.addEventListener('input', function() {
        //     let val = undefined
        //     val = parseInt(el.value)
        //     el.value = val
        //         // parseInt(el.value)
        //     console.log(el.value, typeof(el.value), 'cssessca')
        // })
    }
})
new Vue({
    router,
    store,
    i18n,
    render: h => h(App)
}).$mount('#app')